Send Webhook
sendWebhook is legacy. For new bots, use Request instead — it has more options, cleaner syntax, and better response handling.
What does it do?
Makes HTTP requests to external URLs. By default, POST requests include the chat name (title), phone (formatted), MESSAGES (last 12 text messages), and LAST_MESSAGE in the request body. GET requests automatically exclude all defaults.
1. Syntax
<node_name>:
type: func
func_type: system
func_id: sendWebhook
params:
url: "<url value>"
responseSuccessKey: "success"
responseDataKey: "ResponseData.posResult.customer"
headers:
- "Authorization": "<auth value>"
on_complete: <next_node>
on_failure: <fallback_node>
required params
typetype of the nodefunc_typehere it will be a system functionfunc_idwhat function are we calling (sendWebhook)params.urlthe URL to callon_completenext node
optional params
HTTP method
params.getRequestset totruefor GET (default is POST)params.putRequestset totruefor PUTparams.patchRequestset totruefor PATCH
Request body & headers
params.datarequest body — key-value pairs; supports data injectionparams.headersHTTP headers (array of objects, e.g.- "Authorization": "Bearer ...")params.contentTypeset to"form-data"for multipart form dataparams.jsonStringifyKeysarray of keys whose values should be JSON-stringified before sending
Default body fields
By default, POST requests include these fields. Set to false to exclude:
params.namechat title (set tofalseto exclude)params.phoneformatted phone number (set tofalseto exclude)params.messageslast 12 text messages (set tofalseto exclude)params.lastMessagelast message (set tofalseto exclude)
Response handling
params.responseSuccessKeykey in the response to check for success (truthy value = success)params.responseDataKeydot-path to extract from the response and store in state/crmDataparams.keepResponseiftrue, stores the full response in bot stateparams.parseResponseDataparses array response data into choice-compatible format with sub-params:key— the array key in the response to parseid— field to use as the ID valuetitle— field to use as the display titlecrm_id— field to use as the CRM ID
params.parseObjectsWithBotiftrue, processes response data with bot context
Files
params.injectFilesarray of file references to attach, each with:node— the node name that captured the filekey— (optional) specific file keyfilename— (optional) custom filename
Network
params.useProxyiftrue, routes through a fixed proxy IPparams.dontRejectUnauthorizedHttpsiftrue, skips TLS certificate verification
OAuth
params.injectOAuthinjects an OAuth token into the request headers
Routing
on_failurefallback nodedepartmentassigns the chat to a departmentagentassigns the chat to a specific agent (email address or CRM ID as defined in the Texter agents manager)
2. Examples
GET request with auth header
get_customer:
type: func
func_type: system
func_id: sendWebhook
params:
getRequest: true
url: "https://api.example.com/customers?phone=%chat:phone%"
responseSuccessKey: "success"
responseDataKey: "ResponseData.customer"
headers:
- "Authorization": "Bearer 12345"
on_complete: parse_crm
POST to create a lead
open_lead:
type: func
func_type: system
func_id: sendWebhook
params:
name: false
messages: false
lastMessage: false
firstName: "%state:store.customer.firstName%"
lastName: "%state:store.customer.lastName%"
cellPhone: "%chat:phone%"
interest: "%state:node.new_customer_menu.text%"
wantedTreatment: "%state:store.treatment%"
notes: "%state:node.when_to_schedule.text%"
branch: "%state:store.branchId%"
status: 53
url: "https://example.rapid-image.net/api/import/leads"
headers:
- Authorization: "RoAuth LeadSource=%state:store.account.leadSource%"
on_complete: check_if_branches_match
POST excluding all defaults
send_clean_data:
type: func
func_type: system
func_id: sendWebhook
params:
name: false
phone: false
messages: false
lastMessage: false
url: "https://api.example.com/data"
data:
customField: "value"
on_complete: next_step
With proxy
proxied_webhook:
type: func
func_type: system
func_id: sendWebhook
params:
url: "https://api.example.com/data"
useProxy: true
getRequest: true
on_complete: process_response
Parse response data into choice format
get_branches:
type: func
func_type: system
func_id: sendWebhook
params:
getRequest: true
url: "https://api.example.com/branches"
responseSuccessKey: "success"
parseResponseData:
key: "data"
id: "branchId"
title: "branchName"
crm_id: "crmBranchId"
headers:
- "Authorization": "Bearer token123"
on_complete: select_branch
Attach files from a previous node
send_document:
type: func
func_type: system
func_id: sendWebhook
params:
name: false
messages: false
lastMessage: false
url: "https://api.example.com/upload"
contentType: "form-data"
injectFiles:
- node: upload_document
filename: "document.pdf"
on_complete: confirm_upload
Migrate to Request for new bots. request supports all HTTP methods, proper query params, file uploads, and JSON schema validation of params.
parseResponseData requires all three sub-parameters (key, id, title) to be set, or it fails silently. If you only need to keep the response, use keepResponse: true instead.
By default, sendWebhook includes the chat name, phone, MESSAGES (last 12 text messages), and LAST_MESSAGE in POST requests. Set them to false explicitly if you don't want them included. GET requests automatically exclude all defaults.